#include <iostream>
#include <signal.h>
#include <unistd.h>

using namespace std;

int main()
{
    int n = alarm(5);//5s闹钟
    while(true)
    {
        cout << "process, pid is: " << getpid() << endl;
        sleep(1);
    }
    return 0;
}